import React from "react";
import { Button } from "antd-mobile";
import { useNavigate } from "react-router-dom";
function Buttons({ text }: any) {
  const navigate = useNavigate();

  const totz = () => {
    if (text === "继续") {
      navigate("/ddxq");
    }else if(text === '支付'){
        navigate("/zfcg");
    }
  };

  return (
    <div>
      <Button onClick={totz}>{text}</Button>
    </div>
  );
}

export default Buttons;
